<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>商机列表</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui-win.css" />
    <style>
    	body {
				min-width: 320px;
			}
			#news {
				background-color: #f2f2f2;
			}
			#news ul li {
				overflow: hidden;
			}
			#news ul li a {
				width: 100%;
				display: inline-block;
				border-bottom: 0.2px solid white;
				padding: 10px 10px;
			}
			#news ul li a.active {
				background-color: #d9e4e9;
			}
			#news ul li .userimgs {
				float: left;
				width: 90px;
				height: 90px;
				border-radius: 4px;
			}
			#news .content {
				width: 65%;
				margin-left: 100px;
				overflow: hidden;
			}
			#news .content h2, #news h2 {
				font-size: 20px;
				height: 30px;
				font-weight: 800;
				margin-bottom: 6px;
				background: #F2F2F2;
				line-height: 30px;
				padding-left: 2.5%;
			}
			.jobTitle {
				font-size: 20px;
				height: 50px;
				margin-bottom: 6px;
				background: white;
				line-height: 50px;
				padding-left: 2.5%;
			}
			.jobTitle img {
				height: 16px;
				width: 16px;
			}
			.memberList li {
				border-bottom: 1px solid white !important;
			}
			#news .content p {
				width: 100%;
				color: #999;
				height: 50px;
				overflow: hidden;
				font-size: 14px;
				line-height: 2;
				word-wrap: break-word;
			}
			
			#txtNewsList {
				margin-top: 20px;
			}
			#contentBox{
				height:400px;
				line-height: 400px;
				text-align:center;
				font-size:20px;
				letter-spacing:2px;
			}
			
#img {
	float: left;
	width: 90px;
	height: 90px;
	border-radius: 4px;
}

.content {
	width: 65%;
	margin-left: 100px;
	overflow: hidden;
}
.content h2 {
	font-size: 16px;
	font-weight: 800;
	color: #00abfd;
	margin-bottom: 2px;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}
a{
	color:#999;
}
    </style>
    	
</head>
<body>

	<div class="div_loding_img">
		数据加载中
	</div>

<header class="aui-bar aui-bar-nav aui-bar-yunzo" id="aui-header">
		<a class="aui-btn aui-bar-yunzo aui-pull-left" id="back" onclick="back_go()"> <span class="aui-iconfont aui-icon-left"></span></a>
		<div class="aui-title" id="title">
			商机列表
		</div>
		<a class="aui-iconfont aui-icon-menu aui-pull-right"></a>
</header>
<div class="margin_div"></div>
	<div id="news">

			<ul  id="txtNewsList"></ul>
		</div>
</body>
<script src="../../script/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">
var pagesize = 1000;
	//当前数量
	var curCount = 0;
	//显示内容
	var objcontent;
	var infoid;

$(document).ready(function(){
	sTart_Stop();
	infoid=getUrlParam('infoid');
	var Post=basedata('mygroupinfo')+'&frommid=' + infoid +'&pagesize='+pagesize;
	ajaxcocRequest('../../../api/group/getmemberbusinessinfolist','POST',Post,function(msg){
		if(msg.code==100){
			var obj = $('#txtNewsList');
				if (msg.data != undefined) {
					var html = "<div style='width:20%;margin:40px 0 0 40%;'><img src='../../image/gantan.png' style='width:100%;'></div><p style='width:100%;text-align:center;margin-top:30px;color:#999;font-size:18px;'>他还没有添加商机！</p>";
					if (msg.data.length != 0) {
						html="";
						for (var i = 0; i < msg.data.length; i++) {
							var thisItem = msg.data[i];
							html += '<li><a tapmode="active" onclick="openNews(this,\'' + thisItem.n0 + '\',\'' + thisItem.n2 + '\',\'' + thisItem.n7 + '\',\'' + thisItem.n8 + '\',\'' + thisItem.n9 + '\',\'' + thisItem.n10 + '\',\'' + thisItem.n11 + '\')"><div class="logo"><img id="img" src="' + thisItem.n1.split(',')[0]+ '"/></div><div class="content"><h2 class="bussTitle">' + thisItem.n2 ;
							html += '</h2><p class="name">' + thisItem.n4 + '</p>';
							html += '</div></a></li>';
						}
					} 
					
				}
				$('#txtNewsList').html(html);
		}		
		else{
			$("body").append('<div class="wuwang"><img src="../../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')		}
	});
})
	/*var frommid;
	var did = null;
	var groupid = null;
	var mid = null;
		function openNews(el, infoid, title, broCunts, comCunts, praCunts,isprases,iscollect) {
			api.openWin({
				name : 'busess_info_header',
				url : 'busess_info_header.html',
				pageParam : {
					infoid : infoid,
					title : title,
					broCunts : broCunts,
					comCunts : comCunts,
					praCunts : praCunts,
					isprases : isprases,
					iscollect : iscollect
				},
				opaque : true,
				vScrollBarEnabled : false
			});
		}

		apiready = function() {
		frommid=api.pageParam.myMid;
		api.getPrefs({
				key : 'mid'
			}, function(ret, err) {
				if (ret) {
					mid = ret.value;
				} else {
					mid = initdata.get('mid');
				}
				if (initdata != null) {
					did = initdata.get('dyncinfo');
					groupid = initdata.get('groupid');
				} else {
					did = 22222;
					groupid = '88888888888888888888888888888888';
				}
				getGoodList();
				setRefreshHeader();
			});			
		};
		function getGoodList() {
			api.showProgress({
				title : '数据加载中...',
				modal : false
			});
			ajaxCoCRequest('api/group/getmemberbusinessinfolist?mid=' + mid + '&did=' + did + '&groupid=' + groupid + '&frommid=' + frommid+'&pagesize=10', 'POST', '', function(ret, err) {
				if (ret) {
					if (ret['data']!=undefined) {					
						obj = $api.byId('txtNewsList');
							var html = '';
							
							if(ret.data.length!=0){
								for (var i = 0, len = ret.data.length; i < len; i++) {
								var thisItem = ret.data[i];
								var praisesSrc;
								if(ret.data[i].n10==1){
									praisesSrc="../../image/home/busess/PraiseIcon.png";
								}else{
									praisesSrc="../../image/home/busess/noPraiseIcon.png";
								}
								html += '<li><a tapmode="active" onclick="openNews(this,\'' + thisItem.n0 + '\',\'' + thisItem.n2 + '\',\'' + thisItem.n7 + '\',\'' + thisItem.n8 + '\',\'' + thisItem.n9 + '\',\'' + thisItem.n10 + '\',\'' + thisItem.n11 + '\')"><div class="logo"><img id="img" src="' + thisItem.n1.split(',')[0]+ '"/></div><div class="content"><h2 class="bussTitle">' + thisItem.n2 ;
								html += '</h2><p class="name">' + thisItem.n4 + '</p><p class="company">' + thisItem.n5 + '</p><img class="lookicon" src="../../image/home/busess/browseIcon.png"><span>' + thisItem.n7 + '</span><img class="icon" src="../../image/home/busess/commentIcon.png"><span>' + thisItem.n8 ;
								html += '</span><img class="icon" src="'+praisesSrc+'"><span>' + thisItem.n9 + '</span><div class="time"><img class="icon" src="../../image/home/busess/timeIcon.png"><span>' + thisItem.n3 + '</span></div></div></a></li>';
								}		
							}else{
								html+='<li id="contentBox">您请求的数据为空</li>'
							}
							
							$api.html(obj, html);		
							api.hideProgress();
							//init tapmode
							api.parseTapmode();
					} else {
						api.toast({
							msg : err.msg != null ? err.msg : "请求数据为空",
							location : 'middle'
						})
					}
					api.hideProgress();
				} else {
					api.alert({
						title : "数据请求错误",
						msg : err.msg
					});
					api.hideProgress();
				}
			})
		}

		function openGroup(param) {
			api.openWin({
				name : 'group',
				url : 'group_list.html',
				pageParam : {
					"name" : param
				}
			})
		}

		function setRefreshHeader() {
			api.setRefreshHeaderInfo({
				visible : true,
				bgColor : '#ccc',
				textColor : '#fff',
				textDown : '下拉刷新...',
				textUp : '松开刷新...',
				showTime : true
			}, function(ret, err) {
				getGoodList();
				api.refreshHeaderLoadDone();
			});
		}

		function toDetail() {
			api.openWin({
				name : 'detail',
				url : 'win_newsDetail.html'
			})
		}*/

		function rec(){
			window.history.go(-1)
		}
</script>
</html>